package com.hoshino.momochi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hoshino.momochi.model.domain.BlogViews;
import org.springframework.stereotype.Repository;

@Repository
public interface BlogViewsMapper extends BaseMapper<BlogViews> {

    /**
     * 添加博客浏览量
     *
     * @param bid
     */
    void addNewBlog(Long bid);

    /**
     * 博客浏览量更新
     *
     * @param bid
     */
    void increaseBlogViews(Long bid, Long num);

    /**
     * 根据博客id 获取 博客浏览量
     *
     * @param bid
     * @return
     */
    Long getBlogViews(Long bid);

    /**
     * 删除博客浏览量信息
     *
     * @param bid
     */
    void delBlogViews(Long bid);
}
